package proxy.d.extend;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class IntermediaryMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        System.out.println("寻找房源");
        System.out.println("沟通看房时间");

        Object look = methodProxy.invokeSuper(o,objects);

        System.out.println("跟进卖家");
        return "看房的意见："+look;
    }
}
